﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class PedidoscliFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As PedidoscliBE
        Dim tmpPedidoscli As PedidoscliBE = New PedidoscliBE()
        Try
            With tmpPedidoscli
                .FCancela = convertDTFromDb.convertDateTime(dr.Item("FCancela"))
                .FechaC = convertDTFromDb.convertDateTime(dr.Item("FechaC"))
                .FechaEnt = convertDTFromDb.convertDateTime(dr.Item("FechaEnt"))
                .FechaPed = convertDTFromDb.convertDateTime(dr.Item("FechaPed"))
                .Folio = convertDTFromDb.convertInt32(dr.Item("Folio"))
                .IdCliente = convertDTFromDb.ConvertString(dr.Item("IdCliente"))
                .IdEmpresa = convertDTFromDb.ConvertShort(dr.Item("IdEmpresa"))
                .IdPedido = convertDTFromDb.convertInt32(dr.Item("IdPedido"))
                .IdVendedor = convertDTFromDb.convertInt32(dr.Item("IdVendedor"))
                .Observaciones = convertDTFromDb.ConvertString(dr.Item("Observaciones"))
                .Serie = convertDTFromDb.ConvertString(dr.Item("Serie"))
                .Status = convertDTFromDb.ConvertString(dr.Item("Status"))
                .Usr = convertDTFromDb.ConvertString(dr.Item("Usr"))
                .UsrC = convertDTFromDb.ConvertString(dr.Item("UsrC"))
            End With
            Return tmpPedidoscli
        Catch ex As Exception
            Throw
        Finally
            tmpPedidoscli = Nothing
        End Try
    End Function
End Class
